package com.tgy.基础学习.Lambda;

public class LambdaTest2 {
    public static void main(String[] args) {
/*        Ltest1 ltest1 = (a, b) ->{
            System.out.println(a+b);
        };
        ltest1.jia(1,2);

        Ltest2 ltest2 = (a,b,c)->{
            return a * b+c;
        };
        System.out.println(ltest2.jian(1,2,3));

        Love love = a -> "我爱"+a;

        String aaa = love.sayLove("zzw");
        System.out.println(aaa);

        love = a -> {
            System.out.println("我爱"+a);
            return a;
        };
        love.sayLove("赵紫薇");
*/

        Hate hate = System.out::println;
        hate.sayLove("大家好");

        new Thread(() -> System.out.println("lambda通过runable创建线程")).start();

    }
}


interface Ltest1 {
    abstract void jia(int a,int b);
}


interface Ltest2{
    int jian(int a,int b,int c);
}

interface Love{
    String sayLove(String a);
}

interface Hate{
    void sayLove(String a);
}
